package com.lingxinst.business.main.ui.channel

import android.os.Bundle
import android.view.View
import androidx.appcompat.app.ActionBar
import com.lingxinst.business.main.R
import com.lingxinst.business.main.databinding.FragmentChannelBinding
import com.lingxinst.farm.base.ui.BaseMvvmFragment

// This class is a subclass of BaseMvvmFragment and is used to display a channel fragment
class ChannelFragment : BaseMvvmFragment<FragmentChannelBinding, ChannelViewModel>(R.layout.fragment_channel) {

    override fun initTag(): String {
        return this.javaClass.simpleName
    }

    override fun initUIView(
        view: View,
        savedInstanceState: Bundle?,
        actionBar: ActionBar?
    ) {
        TODO("Not yet implemented")
    }

    override fun getVMClass(): Class<ChannelViewModel> {
       return ChannelViewModel::class.java
    }

    override fun setBindingData() {

    }



    override fun setObserver() {
        super.setObserver()
        // Observe the text property of the view model and update the text view when it changes
        mViewModel.text.observe(viewLifecycleOwner) {
            mBinding.textChannel.text = it
        }
    }


}